package com.ecity.table {
	import com.ecity.util.BitmapClip;
	import com.ecity.util.UIFactory;
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	
	/**
	 * ...仅支持各位和十位数两位的
	 * @author yicheng.zhang
	 */
	public class ResourcesFont extends Sprite {
		
		public function getNumFont(score:int):Sprite {
			var s:Sprite = new Sprite();
			var scoreStr:String = score.toString();
			s.graphics.clear();
			for (var i:int = 0; i < scoreStr.length; i++) {
				var bmp:Bitmap = UIFactory.getBitmapbyName("num_" + (int(scoreStr.charAt(i))+1));
				var bmpd:BitmapData = bmp.bitmapData.clone();
				s.graphics.beginBitmapFill(bmpd);
				s.graphics.drawRect((i-scoreStr.length)*bmp.width, 0, bmp.width, bmp.height);
			}
			s.graphics.endFill();
			return s;
		}
		
	}

}